package com.wangc.commons.configuration.validation;

import org.hibernate.validator.HibernateValidator;

import javax.validation.Validation;

/**
 * hibernate参数校验配置
 *
 * @author LoongChow
 * @date 2018/11/01
 */

public class ValidationConfig {

    public static void initValidation() {
        Validation.byProvider(HibernateValidator.class).configure().failFast(true)
                .buildValidatorFactory().getValidator();
    }
}
